public class SecondQtnThread implements Runnable{
    @Override
    public void run() {

    }

    public static void main(String[] args) {

        Runnable r = ()->{
            for (int i = 0; i <50 ; i++) {
                System.out.println(Thread.currentThread().getName()+"new"+(i+1));
                try {
                    Thread.sleep(200);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        };

        new Thread(r,"线程A").start();

        for (int i = 0; i < 100; i++) {
            System.out.println("new"+(i+1));
            try {
                Thread.sleep(200);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
